public class Typer extends Thread{

    @Override
    public void run() {
        String str="Hello World!!!";
        for (int i = 0; i <str.length() ; i++) {
            System.out.println(this.getName()+"打印:"+str.charAt(i));
            try {
                sleep(1000); //休眠，将运行机会让给cpu去调度其他线程
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
